<script >
import {useStore} from '../store/useStore.js'

export default {
    name: 'Feature2Page',
    data() {
        return {
            testcount: 3,
        }
    },
    setup() {
        const usestore = useStore()
        return {
            usestore,
            increment: usestore.increment,
            decrement: () => {
                count = 10
            }
        }
    },
    methods: {
        incrementtestcount() {
            this.testcount++
        },
    }
 }
</script>

<template>
    <div class="feature-2">
        feature-2
        <span>{{ usestore.count }}</span>
        <el-button @click="increment">加1</el-button>
        <br>
        <span>{{ testcount }}</span>
        <el-button @click="incrementtestcount">加1</el-button>
    </div>
</template>

<style lang="less" >
.feature-2 {    
    background-color: #f5f5f5;
}
</style>